<?php
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\BaseController as Controller;
use App\Services\Admin\ActionService;

class BaseController extends Controller
{
    /**
     * 后台基本控制器
     */

    protected $prefix_url;//路由前缀
    protected $crumbs;//面包屑
    protected $admin_url = '/mcadmin';//后台路由前缀
    protected $formView = 'admin.layouts.';

    public function __construct()
    {
        //exit("s");
        parent::__construct();
        define('ADMIN_DOMAIN',DOMAIN.$this->admin_url); //后台路由前缀
        define('PUB_ADMIN_DOMAIN',DOMAIN.'/assets-admin/'); //后台静态资源前缀
        $actionService = new ActionService();

        view()->share('home',$actionService->getHome());
        view()->share('homeSubs',$actionService->getHomeSub());
        view()->share('leftMenus',$actionService->getModules());

    }
}
